﻿CREATE TABLE [dbo].[Registros] (
    [IdRegistro] INT      IDENTITY (1, 1) NOT NULL,
    [IdEvento]   TINYINT  NULL,
    [IdUsuario]  INT      NOT NULL,
    [Fecha]      DATETIME CONSTRAINT [DF_Registros_Fecha] DEFAULT (getdate()) NOT NULL,
    CONSTRAINT [PK_Registros] PRIMARY KEY CLUSTERED ([IdRegistro] ASC),
    CONSTRAINT [FK_Registros_Eventos] FOREIGN KEY ([IdEvento]) REFERENCES [dbo].[Eventos] ([IdEvento]),
    CONSTRAINT [FK_Registros_Usuarios] FOREIGN KEY ([IdUsuario]) REFERENCES [dbo].[Usuarios] ([IdUsuario])
);



